<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center"><div class="table-first-id">ID</div></th>
            <th class="text-center" width="15%">角色名称</th>
            <th class="text-center" width="35%">角色职责</th>
            <th class="text-center" width="10%">创建人</th>
            <th class="text-center" width="15%">创建时间</th>
            <th class="text-center" width="10%">状态</th>
            <th class="text-center" width="15%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody>
            <tr class="jqgfirstrow" role="row">
                <th class="text-center"><div class="table-first-id">&nbsp;</div></th>
                <th class="text-center" width="15%">&nbsp;</th>
                <th width="35%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="15%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="15%">&nbsp;</th>
            </tr>
            <tr th:if="${dataMap['list']==null or #lists.isEmpty(dataMap['list'])}">
                <td colspan="7" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有角色数据~~~</span></p>
                    </div>
                </td>
            </tr>
            <tr th:if="${dataMap['list']!=null and #lists.size(dataMap['list']) > 0}" th:each="sysRole : ${dataMap['list']}" th:id="'role-data-'+${sysRole.id}">
                <td class="text-center">
                    <input th:if="${sysRole.id} &gt; 6" type="checkbox" class="i-checks" name="roleIds" th:value="${sysRole.id}" th:default="0"/>
                    <span th:if="${sysRole.id} &lt; 6">—</span>
                </td>
                <td class="text-center" th:id="'role-name-'+${sysRole.id}" th:text="${sysRole.roleName}"></td>
                <td class="text-center" th:text="${sysRole.depict}"></td>
                <td class="text-center" th:text="${sysRole.sysUser}==null?'—' : ${sysRole.sysUser.ralName}">
                    —
                </td>
                <td class="text-center" th:text="${#strings.substring(sysRole['createTime'],0,16)}">
                </td>
                <td class="text-center" th:id="'role-status-'+${sysRole['id']}">
                    <span class="label label-info" th:if="${sysRole['status']}==1">正常</span>
                    <span class="label label-danger" th:if="${sysRole['status']}==2">冻结</span>
                </td>
                <td class="text-center">
                    <a href="javascript:void(0);" class="role-check-btn c-master fs14" th:attr="data-id=${sysRole['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="查看">
                        <i class="fa fa-eye"></i>
                    </a>
                    <a th:href="@{/admin/manage/role/initUpdateRole?roleId={id}(id=${sysRole['id']})}" class="role-update-btn c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="修改">
                        <i class="fa fa-edit"></i>
                    </a>
                    <a th:if="${sysRole['status']}==1 and ${sysRole['id']} != 1" href="javascript:void(0);" class="role-lock-btn c-master fs14 ml5" th:classappend="'role-action-status-'+${sysRole['id']}" th:attr="data-id=${sysRole['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="冻结">
                        <i class="fa fa-unlock-alt"></i>
                    </a>
                    <a th:href="@{/admin/manage/role/initRoleFunction?roleId={roleId}(roleId=${sysRole['id']})}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="授权">
                        <i class="fa fa-cogs"></i>
                    </a>
                    <a th:if="${sysRole['status']}==2" href="javascript:void(0);" class="role-unLock-btn c-master fs14 ml5" th:classappend="'role-action-status-'+${sysRole['id']}" th:attr="data-id=${sysRole['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="恢复">
                        <i class="fa fa-history"></i>
                    </a>
                    <a th:if="${sysRole['id']} > 5" href="javascript:void(0);" class="role-delete-btn c-master fs14 ml5" th:attr="data-id=${sysRole['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="删除">
                        <i class="fa fa-trash-o"></i>
                    </a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
</html>
